home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / mac / DirectX SDK / DXSDK / samples / Multimedia / Direct3D / DXTex / dxtex.h < prev    next >
C/C++ Source or Header  |  2001-10-08  |  3KB  |  96 lines

  1. // dxtex.h : main header file for the DXTEX application
  2. //
  3.  
  4. #if !defined(AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_)
  5. #define AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_
  6.  
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10.  
  11. #ifndef __AFXWIN_H__
  12.     #error include 'stdafx.h' before including this file for PCH
  13. #endif
  14.  
  15. #include "resource.h"       // main symbols
  16.  
  17. #ifndef ReleasePpo
  18.     #define ReleasePpo(ppo) \
  19.         if (*(ppo) != NULL) \
  20.         { \
  21.             (*(ppo))->Release(); \
  22.             *(ppo) = NULL; \
  23.         } \
  24.         else (VOID)0
  25. #endif
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // CDxtexDocManager:
  29. // I override this class to customize DoPromptFileName to allow importing of
  30. // BMPs as well as DDSs into CDxtexDocs.
  31. //
  32. class CDxtexDocManager : public CDocManager
  33. {
  34. public:
  35.     virtual BOOL DoPromptFileName(CString& fileName, UINT nIDSTitle,
  36.             DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate);
  37. };
  38.  
  39. /////////////////////////////////////////////////////////////////////////////
  40. // CDxtexCommandLineInfo:
  41. // I override this class to handle custom command-line options
  42. //
  43. class CDxtexCommandLineInfo : public CCommandLineInfo
  44. {
  45. public:
  46.     CString m_strFileNameAlpha;
  47.     CString m_strFileNameSave;
  48.     D3DFORMAT m_fmt;
  49.     BOOL m_bAlphaComing;
  50.     BOOL m_bMipMap;
  51.  
  52.     CDxtexCommandLineInfo::CDxtexCommandLineInfo(VOID);
  53.     virtual void ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast);
  54.  
  55. };
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CDxtexApp:
  59. // See dxtex.cpp for the implementation of this class
  60. //
  61.  
  62. class CDxtexApp : public CWinApp
  63. {
  64. public:
  65.     CDxtexApp();
  66.     virtual ~CDxtexApp();
  67.     LPDIRECT3D8 Pd3d(VOID) { return m_pd3d; }
  68.     LPDIRECT3DDEVICE8 Pd3ddev(VOID) { return m_pd3ddev; }
  69.  
  70. // Overrides
  71.     // ClassWizard generated virtual function overrides
  72.     //{{AFX_VIRTUAL(CDxtexApp)
  73.     public:
  74.     virtual BOOL InitInstance();
  75.     //}}AFX_VIRTUAL
  76.  
  77. // Implementation
  78.     //{{AFX_MSG(CDxtexApp)
  79.     afx_msg void OnAppAbout();
  80.         // NOTE - the ClassWizard will add and remove member functions here.
  81.         //    DO NOT EDIT what you see in these blocks of generated code !
  82.     //}}AFX_MSG
  83.     DECLARE_MESSAGE_MAP()
  84. private:
  85.     LPDIRECT3D8 m_pd3d;
  86.     LPDIRECT3DDEVICE8 m_pd3ddev;
  87. };
  88.  
  89.  
  90. /////////////////////////////////////////////////////////////////////////////
  91.  
  92. //{{AFX_INSERT_LOCATION}}
  93. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  94.  
  95. #endif // !defined(AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_)
  96.